<?php declare(strict_types=1);

use Hyperf\Contract\StdoutLoggerInterface;
use Psr\Log\LogLevel;

use function Hyperf\Support\env;

$logLevels = [
    LogLevel::ALERT,
    LogLevel::CRITICAL,
    LogLevel::EMERGENCY,
    LogLevel::ERROR,
    LogLevel::INFO,
    LogLevel::NOTICE,
    LogLevel::WARNING,
];

//IS_PROD || $logLevels[] = LogLevel::DEBUG;

defined('URL_PREFIX_CONTROL') || define('URL_PREFIX_CONTROL', env('CONTROL_URL_PREFIX', '/_control'));

return [
    'app_env' => env('APP_ENV', 'dev'),
    'app_name' => env('APP_NAME', 'skeleton'),
    'scan_cacheable' => env('SCAN_CACHEABLE', false),

    //是否开启日志
    'app_log_enable' => (bool)env('APP_LOG_ENABLE', true),

    StdoutLoggerInterface::class => [
        'log_level' => $logLevels,
    ],

    'crontab' => [
        'enable' => true
    ]
];
